<%-- 
    Document   : index
    Created on : 24-Jan-2012, 19:54:12
    Author     : theInterloper
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import = "Web.*"%>
<%
shopControl.loadAllItemsToSession(request, response);
shopControl.loadAllArtistsToSession(request, response);

                        
                        Boolean checkArtistIsLoggedIn = (Boolean)session.getAttribute("artistisloggedin");
                        Boolean checkCustomerIsLoggedIn = (Boolean)session.getAttribute("customerisloggedin");
                        System.out.println("Customer session is: " + checkCustomerIsLoggedIn);
                        System.out.println("Artist session is: " + checkArtistIsLoggedIn);
                       
                        if(checkArtistIsLoggedIn == null){
                            checkArtistIsLoggedIn = false;
                            session.setAttribute("artistisloggedin", new Boolean(checkArtistIsLoggedIn));
                            System.out.println("Login checked artist is null, set to " + checkArtistIsLoggedIn);
                                         
                            
                        }
                        if(checkCustomerIsLoggedIn == null){
                            checkCustomerIsLoggedIn = false;
                            session.setAttribute("customerisloggedin", new Boolean(checkCustomerIsLoggedIn));
                            System.out.println("Login checked customer is null, set to " + checkCustomerIsLoggedIn);
                                         
                            
                        }
%>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<title></title>
	<meta name="description" content="">
	<meta name="author" content="">

	<meta name="viewport" content="width=device-width,initial-scale=1">

	<link rel="stylesheet" href="${pageContext.request.contextPath}/parts/css/style.css">

	<script src="${pageContext.request.contextPath}/parts/js/libs/modernizr-2.0.6.min.js"></script>
</head>
<body>
	<div id="header-container">
		<header class="wrapper">
			<h1 id="title">Crafty Webshop </h1>
			<nav>
				<ul>
					<li><a href="${pageContext.request.contextPath}/index.jsp">Home</a></li>
					<li><a href="${pageContext.request.contextPath}/allitems.jsp">Pieces</a></li>
					<li><a href="${pageContext.request.contextPath}/allartists.jsp">Artists</a></li>
				</ul>
			</nav>
		</header>
	</div>
	<div id="main" class="wrapper">
		<aside>
                    
		</aside>
		<article>
			<header>
				<h2>Welcome New Collector!</h2>
				<form id ="registercustomer" class="clearfix" action="shopControl" method ="get" >
                            <fieldset>
                                <legend>Please Enter The Following Details</legend>                
                                <ol>
                                    <li>
                                        <label for="userName">Username</label><br>
                                        <input id ="userName" name="username" type ="text" placeholder ="Enter a username" required ></input>
                                    </li>
                                    <li>
                                        <label for="password">Password</label><br>
                                        <input id="passWord" name="password" type="password" placeholder="Enter a Password" required></input>
                                    </li>
                                    <li>
                                        <label for="confirmpassword">Confirm Password</label><br>
                                        <input id="confirmPassWord" name="confirmpassword" type="password" placeholder="Re-enter Password" required></input>
                                    </li>
                                    <li>
                                        <label for="firstName">First Name</label><br>
                                        <input id ="firstName" name="firstname" type ="text" placeholder ="Joe" required ></input>
                                    </li>
                                    <li>
                                        <label for="secondName">Second Name</label><br>
                                        <input id ="secondName" name="secondname" type ="text" placeholder ="Bloggs" required ></input>
                                    </li>
                                    <li>
                                        <label for="emailAddress">Email Address</label><br>
                                        <input id ="emailAddress" name="emailaddress" type ="email" placeholder ="joe@bloggs.com" required ></input>
                                    </li>
                                    <li>
                                        <label for="phoneNumber">Phone Number</label><br>
                                        <input id ="phoneNumber" name="phonenumber" type ="tel" placeholder ="xxxxxxxxxx" required ></input>
                                    </li>
                                    <li>
                                        <label for="address1">Street Address</label><br>
                                        <input id ="address1" name="address1" type ="text" placeholder ="23 Fake Street" required ></input>
                                    </li>
                                    <li>
                                        <label for="address2">City</label><br>
                                        <input id ="address2" name="address2" type ="text" placeholder ="Fakesville" required ></input>
                                    </li>
                                    <li>
                                        <label for="address3">Country</label><br>
                                        <input id ="address3" name="address3" type ="text" placeholder ="Fakecountry" required ></input>
                                    </li>                               
                                    <li>
                                        <input type="hidden" name="control" value="6" />
                                        <button type=submit>Go!</button>
                                    </li>
                                </ol>     
                            </fieldset>
                            
                        </form>
			</header>
			<footer>
			<h3>About the author</h3>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor.</p>
			</footer>
		</article>
	</div>
	<div id="footer-container">
		<footer class="wrapper">
			<h3>A nice footer</h3>
		</footer>
	</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="${pageContext.request.contextPath}/parts/js/libs/jquery-1.7.1.min.js"><\/script>')</script>

<!-- scripts concatenated and minified via ant build script-->
<script src="${pageContext.request.contextPath}/parts/js/plugins.js"></script>
<script src="${pageContext.request.contextPath}/parts/js/script.js"></script>
<!-- end scripts-->

</body>
</html>
